<?php
/**
* CfHelper
*/
class CfHelper extends Helper
{	
	function getProfilName($arr, $id)
	{
		foreach($arr as $key):
			if ($key['Profil']['id'] == $id)
				return $key['Profil']['label'];
		endforeach;
		return null;
	}
	
	function getInterventionName($arr, $id)
	{
		foreach($arr as $key):
			if ($key['Intervention']['id'] == $id)
				return $key['Intervention']['label'];
		endforeach;
		return null;
	}
	
	function getCompanyName($arr, $id)
	{
		foreach($arr as $key):
			if ($key['Company']['id'] == $id)
				return $key['Company']['name'];
		endforeach;
		return null;
	}
	
	function getContract($arr, $id)
	{
		foreach($arr as $key):
			if ($key['Contract']['id'] == $id)
				return $key['Contract'];
		endforeach;
		return null;
	}
}
?>